﻿// -------------------------------------------------------------------------
//    @FileName         :    NFCounterPart.cpp
//    @Author           :    gaoyi
//    @Date             :    2025/1/7
//    @Email            :    445267987@qq.com
//    @Module           :    NFCounterPart
//
// -------------------------------------------------------------------------

#include "NFCounterPart.h"

#include "proto_db.pb.h"

NFCounterPart::NFCounterPart()
{
    if (EN_OBJ_MODE_INIT == NFShmMgr::Instance()->GetCreateMode())
    {
        CreateInit();
    }
    else
    {
        ResumeInit();
    }
}

NFCounterPart::~NFCounterPart()
{
}

int NFCounterPart::CreateInit()
{
    return 0;
}

int NFCounterPart::ResumeInit()
{
    return 0;
}

int NFCounterPart::LoadFromDB(const proto_ff::tbRoleDetail* pDBData)
{
    m_stData.FromPb(pDBData->role_other_data().counter());
    return 0;
}

int NFCounterPart::InitConfig(proto_ff::tbRoleDetail* pDbData, const RoleOne& stRoleOne)
{
    pDbData->mutable_role_other_data()->mutable_counter();
    return 0;
}

int NFCounterPart::SaveDB(proto_ff::tbRoleDetail* pDBData)
{
    m_stData.ToPb(pDBData->mutable_role_other_data()->mutable_counter());
    return 0;
}

int NFCounterPart::MakePlayerDataCS(proto_ff::Proto_CSGetRoleRsp* pCSGetRoleRsp)
{
    return 0;
}

int NFCounterPart::MakeCityPlayerData(proto_ff::CityRoleInfo* pGCCityRoleInfo)
{
    return 0;
}
